Skip to content

module-kit 0.5.0: effect "publish", with destructiveHint and no publication in production until D1 - #11

Merged
immakermatty merged 1 commit into
mainfrom
agent/publish-effect
Nov 18, 2026
Merged

immakermatty merged 1 commit into
mainfrom
agent/publish-effect

Conversation

@immakermatty

Copy link
Copy Markdown
Contributor

module-kit 0.5.0: tools declare a publication as effect: "publish". The library itself guarantees destructiveHint and that a production application offers no publication until decision D1 of LZD-0037 is settled. This is the library side of the Module Standard's "Effects and publication" (Lazurio/LazurioPlatform#1078).

Why: Matěj decided D1 on 2026-11-18: agents write drafts on their own and publish only after the person's explicit "Publikuj". Thread A (MODUL A APLIKACE) proposed moving both guarantees into the library, because readiness cannot find publication tools reliably by reading the source (#1079). Readiness then only requires this release as the minimum version.

Change (breaking, hence 0.5.0)

  • ToolEffect: read, prepare, write (a draft) and publish (a publication, a tool of its own).
  • destructiveHint: true comes exactly from effect: "publish". The App does not set it.
  • The writer gate: a draft and a publication pass the same dataWriter gate, so neither is offered in a read-only copy.
  • Production: a publication is not offered on /mcp or on the page while deployment() is production. A call to one is refused with forbidden and a message naming LZD-0037 D1. A development version offers it. AGENT_PUBLICATION_IN_PRODUCTION = false is the one place that changes once Matěj decides how the App knows the person's "Publikuj".
  • Refused at registration: effect: "write" with publishesData: true, any publicationConsent, and an unknown effect. The type refuses them too.
  • The README "Effects" section is rewritten.

Not decided here, flagged for the coordinator: Clients (HumanAndMachine-ai/rozjedemeai-clients#35) uses publicationConsent today. That follows Matěj's DEV-6696 decision that agents publish Clients tickets directly. On 0.5.0 its ticket publication would not be offered in production until D1's variant is decided. Clients therefore stays on 0.4.x until then, unless Matěj decides otherwise.

Verification: bun run check (tsc and Biome) and bun test (113 tests) pass. The new tests cover:

  • a publication is absent from production and refused there with D1 named, on /mcp and on the page;
  • it is present in a development version with destructiveHint: true;
  • it is absent from a read-only copy;
  • the three refused 0.4 declarations;
  • effectOf answers publish.

The README's install line stays at v0.4.0 until this is released.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread mcp:3e1c89fb-5ac2-43b2-9ec4-23f4a2e51382

🤖 Generated with Claude Code

…cation in production until D1

Decision D1 of LZD-0037 (Matěj, 2026-11-18): agents write drafts on their
own and publish only after the person's explicit "Publikuj". A tool's
effect is read, prepare, write (a draft) or publish (a publication, a tool
of its own). The registry gives a publication destructiveHint itself;
a draft and a publication pass the same writer gate; a production
application offers no publication until the Owner decides how the App
knows the person's "Publikuj" (AGENT_PUBLICATION_IN_PRODUCTION, the one
place that changes), a development version does. A 0.4 declaration of a
publication (write with publishesData true, publicationConsent) is refused
at registration. Readiness can then require 0.5.0 as the minimum version
instead of reading the source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The publication gate and annotations match the decision in Lazurio/LazurioPlatform#1078. TypeScript checks and 113 tests passed locally; both TypeScript and Python CI jobs passed.

Non-blocking: LZD-0037 still describes the earlier publicationConsent behavior. Its update is proposed in LazurioDevelopment/mission-control-data#258.

Order and migrations: Keep Clients on 0.4.x until the Owner decides the production publication mechanism; update LZD-0037 via https://github.com/LazurioDevelopment/mission-control-data/pull/258 before coordinating adoption of 0.5.0.

— Pablo

@immakermatty
immakermatty merged commit 5635d83 into main Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants